#!/usr/bin/perl -w
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
# 
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are Copyright (C) 1998
# Netscape Communications Corporation. All Rights Reserved.
# 
# Contributor(s): TomWij <TomWij@live.com>

##############################################################################
#
# testEverything.cgi
# ------------------
# Runs the whole test suite.
#
##############################################################################
system('echo off');
print "> Backing up configuration.\n\n";
system('copy /Y ..\data\severityMap ..\data\severityMap.bak && copy /Y ..\data\classification ..\data\classification.bak && copy /Y ..\data\classifier ..\data\classifier.bak'); 

print "\n> Test Classification\n\n";
system('perl -wT testClassification.cgi');

print "\n> Test Classificatier\n\n";
system('perl -wT testClassifier.cgi');

print "\n> Test Severity Map\n\n";
system('perl -wT testSeverityMap.cgi');

print "\n> Test Statistics\n\n";
system('perl -wT testStatistics.cgi');

print "\n> Test Training\n\n";
system('perl -wT testTraining.cgi');

print "\n> Test Suggestions\n\n";
system('perl -wT testSuggestions.cgi');

print "\n> Test Bug Model Influence\n\n";
system('perl -wT testBugModelInfluence.cgi');

print "\n> Test Update System\n\n";
system('perl -wT testUpdates.cgi');

print "\n> Placing back configuration.\n\n";
system('move /Y ..\data\severityMap.bak ..\data\severityMap && move /Y ..\data\classification.bak ..\data\classification && move /Y ..\data\classifier.bak ..\data\classifier'); 
system('echo on');